package com.rsy.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.rsy.common.utils.PageUtils;
import com.rsy.product.entity.AttrEntity;
import com.rsy.product.vo.AttrGroupRelationVo;
import com.rsy.product.vo.AttrRespVo;
import com.rsy.product.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author rsy
 * @email sunlightcs@gmail.com
 * @date 2022-05-01 00:16:03
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

    PageUtils queryBaseAttrPage(Map<String, Object> params, Long catelogId, String attrtype);

    AttrRespVo getAttrInfo(Long attrId);
    //修改
    void updateAttr(AttrVo attr);
    //获取属性分组关联的所有属性(根据属性分组id)
    List<AttrEntity> getRelationAttr(Long attrgroupId);

    //删除属性与删除属性与分组的关联关系
    void deleteRelation(AttrGroupRelationVo[] vos);

    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);

    //根据id查询所有可以被检索的规格属性
    List<Long> selectSearchAttrs(List<Long> attrIds);
}

